package com.wxw.BaseLibrary.element;

import android.graphics.Color;
import android.view.Gravity;
import com.wxw.BaseLibrary.component.DataGridColumnType;

/**
 *
 * @author david
 * @date 2014-06-27
 */
public class DataSourceColumn {
    public String Name = "";
    public int TextGravity = Gravity.CENTER;
    public String FloatFormat = "";
    public int Width = 0;
    public int[] BgColors = null;
    public IDataGridCellViewAgent DataGridCellViewAgent = null;
    public boolean canClick = true;
    public DataGridColumnType columnType = DataGridColumnType.TextViewCell;
    public int styleId = -1;
    public int fontColor = Color.BLACK;

    public DataSourceColumn(String name, int textGravity, String floatFormat, int width) {
        this(name, textGravity, floatFormat, width, null);
    }

    public DataSourceColumn(String name, int textGravity, String floatFormat, int width, int[] bgColors) {
        this(name, textGravity, floatFormat, width, bgColors, null);
    }

    public DataSourceColumn(String name, int textGravity, String floatFormat, int width, int[] bgColors, IDataGridCellViewAgent agent) {
        this(name, textGravity, floatFormat, width, bgColors, agent, true);
    }

    public DataSourceColumn(String name, int textGravity, String floatFormat, int width, int[] bgColors, IDataGridCellViewAgent agent, boolean canClick) {
        this(name, textGravity, floatFormat, width, bgColors, agent, canClick, DataGridColumnType.TextViewCell);
    }

    public DataSourceColumn(String name, int textGravity, String floatFormat, int width, int[] bgColors,
                            IDataGridCellViewAgent agent, boolean canClick, DataGridColumnType columnType) {
        this(name, textGravity, floatFormat, width, bgColors, agent, canClick, columnType, -1);
    }

    public DataSourceColumn(String name, int textGravity, String floatFormat, int width, int[] bgColors,
                            IDataGridCellViewAgent agent, boolean canClick, DataGridColumnType columnType, int styleId) {
        Name = name;
        TextGravity = textGravity;
        FloatFormat = floatFormat;
        Width = width;
        BgColors = bgColors;
        DataGridCellViewAgent = agent;
        this.canClick = canClick;
        this.columnType = columnType;
        this.styleId = styleId;
    }
}
